package com.tz.dream.architect.mvp.framework.support.viewstate;

import android.support.annotation.NonNull;

import com.tz.dream.architect.mvp.framework.MvpPresenter;
import com.tz.dream.architect.mvp.framework.MvpView;
import com.tz.dream.architect.mvp.framework.support.MvpDelegateCallback;

/**
 * 作者: Dream on 2018/4/1 21:07
 * QQ:510278658
 * E-mail:510278658@qq.com
 */

//代理二->针对ViewState缓存->目标接口
public interface MvpViewStateDelegateCallback<V extends MvpView, P extends MvpPresenter<V>, VS extends ViewState<V>> extends MvpDelegateCallback<V, P> {

    VS getViewState();

    void setViewState(VS viewState);

    @NonNull
    VS createViewState();

    void setRestoringViewState(boolean restoringViewState);

    boolean isRestoringViewState();

    void onViewStateInstanceRestored(boolean instanceStateRetained);

    void onNewViewStateInstance();

}
